<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
	<xsl:template match="/">
	<html>
		<head>
			<link rel="stylesheet" type="text/css" href="css/catalog.css" />
			<title>netflow - catalogue</title>
		</head>
		<body>
			<h1>Catalogue des DVD</h1>
			<xsl:for-each select="//dvd">
			<div class="dvd">
				<div class="title">
					<h2> <xsl:value-of select="title" /> </h2>
					
					<div class="langs">
						<xsl:for-each select="soundtrack/lang">
						<img class="lang">
							<xsl:attribute name="src"> img/<xsl:value-of select="text()"/>.gif </xsl:attribute>
							<xsl:attribute name="alt"> (<xsl:value-of select="text()"/>) </xsl:attribute>
						</img>
						</xsl:for-each>
					</div>
				</div>
				
				<h3 class="summary">Prix:</h3>
				<p class="summary">
					Disponible à <xsl:value-of select="price"/> €
				</p>
				
				<h3 class="runtime">Durée:</h3>
				<p class="runtime"><xsl:value-of select="movie/runtime"/> min.</p>
				
				<h3 class="summary">Description:</h3>
				<p class="summary">
					<xsl:value-of select="summary"/>
				</p>
				
				<h3 class="actors">Acteurs:</h3>
				<ul class="actors">
					<xsl:for-each select="actor">
					<li class="actor">
						<spawn class="name"> <xsl:value-of select="name"/> </spawn>
						dans le role de <spawn id="role"> <xsl:value-of select="role"/> </spawn>
					</li>
					</xsl:for-each>
				</ul>
			</div>
			<!-- Pour chaque dvd on a un bouton pour acheter ce dvd -->
			<FORM Method="GET" Action="?p=buy">
				<a class="button">
				<xsl:attribute name="href">
					?p=buy&amp;id=
					<xsl:value-of select="attribute::id" />
				</xsl:attribute>
					Acheter ce dvd 
				</a>

			</FORM>
			</xsl:for-each>
		
		</body>
	</html>
	</xsl:template>
	
</xsl:stylesheet>


